#ifndef _CVECTOR_H_
    #define _CVECTOR_H_

#include <gl/gl.h>
#include <gl/glu.h>

#include <math.h>

//=============================================================================
class CVector {
    public:
        double X;
        double Y;
        double Z;

    public:
        CVector();
        CVector(float X, float Y, float Z);

        bool operator==(CVector Vector);
        bool operator!=(CVector Vector);

        CVector operator+(CVector Vector);
        CVector operator-(CVector Vector);
        CVector operator/(CVector Vector);
        CVector operator*(CVector Vector);

        CVector operator+(float Value);
        CVector operator-(float Value);
        CVector operator/(float Value);
        CVector operator*(float Value);

        CVector Copy();

        void Normalize();

        double Magnitude();

        double Distance(CVector Vector);

        double DotProduct(CVector Vector);

        CVector CrossProduct(CVector Vector);

        CVector RayIntersectPlane(CVector Origin, CVector PlaneNormal);
};

//=============================================================================

#endif


